import Vue from 'vue'
import App from './App.vue'
import { Button, Select, Card, Carousel, Spin, Icon, Table } from 'ant-design-vue'
import VueRouter from 'vue-router'

import 'ant-design-vue/dist/antd.css'
import FourGirlMountain from '@/components/page/FourGirlMountain'
import NineCampRavine from '@/components/page/NineCampRavine'
import FourGirlMountainCategory from '@/components/page/FourGirlMountainCategory'
import NineCampRavineCategory from '@/components/page/NineCampRavineCategory'

Vue.component(Button.name, Button)
Vue.component(Select.name, Select)
Vue.component(Card.name, Card)
Vue.component(Carousel.name, Carousel)
Vue.component(Spin.name, Spin)
Vue.component(Icon.name, Icon)
Vue.component(Table.name, Table)

Vue.use(Select)
Vue.use(VueRouter)

const routes = [
  { path: '/', component: NineCampRavine },
  { path: '/f', component: FourGirlMountain },
  { path: '/n', component: NineCampRavine },
  { path: '/fc', component: FourGirlMountainCategory },
  { path: '/nc', component: NineCampRavineCategory },
]

const router = new VueRouter({
  routes,
  mode: 'history'
})

// router.beforeEach(((to, from, next) => {
//   document.documentElement.scrollTop = 0
//   next()
// }))

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
